package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the PRTC_NAT database table.
 * 
 */
@Entity
@Table(name="PRTC_NAT")
public class PrtcNat implements Serializable {
	private static final long serialVersionUID = 1L;
	private PrtcNatPK id;
	private String agntSync;
	private String apeMat;
	private String apePat;
	private String control;
	private String flagTipo;
	private String nombres;
	private String nuDocIden;
	private String tiDocIden;
	private Date tsUltSync;
	private OficRegistral oficRegistral;

    public PrtcNat() {
    }


	@EmbeddedId
	public PrtcNatPK getId() {
		return this.id;
	}

	public void setId(PrtcNatPK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(name="APE_MAT", length=50)
	public String getApeMat() {
		return this.apeMat;
	}

	public void setApeMat(String apeMat) {
		this.apeMat = apeMat;
	}


	@Column(name="APE_PAT", length=50)
	public String getApePat() {
		return this.apePat;
	}

	public void setApePat(String apePat) {
		this.apePat = apePat;
	}


	@Column(length=1)
	public String getControl() {
		return this.control;
	}

	public void setControl(String control) {
		this.control = control;
	}


	@Column(name="FLAG_TIPO", length=1)
	public String getFlagTipo() {
		return this.flagTipo;
	}

	public void setFlagTipo(String flagTipo) {
		this.flagTipo = flagTipo;
	}


	@Column(length=50)
	public String getNombres() {
		return this.nombres;
	}

	public void setNombres(String nombres) {
		this.nombres = nombres;
	}


	@Column(name="NU_DOC_IDEN", length=12)
	public String getNuDocIden() {
		return this.nuDocIden;
	}

	public void setNuDocIden(String nuDocIden) {
		this.nuDocIden = nuDocIden;
	}


	@Column(name="TI_DOC_IDEN", length=2)
	public String getTiDocIden() {
		return this.tiDocIden;
	}

	public void setTiDocIden(String tiDocIden) {
		this.tiDocIden = tiDocIden;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to OficRegistral
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="OFIC_REG_ID", referencedColumnName="OFIC_REG_ID", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="REG_PUB_ID", referencedColumnName="REG_PUB_ID", nullable=false, insertable=false, updatable=false)
		})
	public OficRegistral getOficRegistral() {
		return this.oficRegistral;
	}

	public void setOficRegistral(OficRegistral oficRegistral) {
		this.oficRegistral = oficRegistral;
	}
	
}